package aishua.com.mytestapplist.hencoder;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.util.AttributeSet;
import android.view.View;

import aishua.com.mytestapplist.utils.LogUtils;

/**
 * Created by aishua on 2017/9/22.
 */

public class HenCoderDrawColorView extends View {
    private static final String TAG = "HenCoderDrawColorView-";
    private Paint paint;
    public HenCoderDrawColorView(Context context) {
        super(context);
        LogUtils.v(TAG+"HenCoderDrawColorView(Context context)");
        init();
    }


    public HenCoderDrawColorView(Context context, AttributeSet attrs) {
        super(context, attrs);
        LogUtils.v(TAG+"HenCoderDrawColorView(Context context, AttributeSet attrs)");
        init();
    }

    public HenCoderDrawColorView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        LogUtils.v(TAG+"HenCoderDrawColorView(Context context, AttributeSet attrs, int defStyleAttr)");
        init();
    }

    private void init() {
        paint = new Paint();
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        LogUtils.v(TAG+"canvas:getWidth"+canvas.getWidth()+"---cavas:getHeight"+canvas.getHeight());
        canvas.drawColor(Color.RED);
//        paint.setXfermode()

    }
}
